// 云函数入口文件
const cloud = require('wx-server-sdk')
const env = 'cloud1-6ge2blo641f1689d'
cloud.init()
const db = cloud.database({env})
// 云函数入口函数
exports.main = async (event, context) => {
  // const noteList = await db.collection('note').get();
 return db.collection('note').aggregate().lookup({
    from:'userInfo',
    localField:'noteId',
    foreignField:'myNoteId',
    as:'noteList'
  }).end()
  
}
